﻿using System;
using DefaultNamespace;
using JetBrains.Annotations;
using UnityEngine;

namespace FSM.PlayerState
{
    // [RequireComponent(typeof(Animator), typeof(InputReader), typeof(CharacterController))]
    public class PlayerStateMachine : StateMachine
    {
        [field: SerializeField] public InputReader InputReader { get; [UsedImplicitly] private set; }
        [field: SerializeField] public CharacterController CharControl { get; [UsedImplicitly] private set; }
        [field: SerializeField] public Animator Animator { get; [UsedImplicitly] private set; }
        [field: SerializeField] public float FreeLookMoveSpeed { get; [UsedImplicitly] private set; }
        [field: SerializeField] public float RotationDamp { get; [UsedImplicitly] private set; }
        public Transform MainCameraTransform { get; [UsedImplicitly] private set; }

        private void Awake()
        {
            MainCameraTransform = Camera.main.transform;
        }

        private void Start()
        {
            SwitchState(new PlayerFreeLookState(this));
        }

    }
}